﻿using System;
using System.Collections.Generic;
using System.Text;
using MbUnit.Framework;
using MyTestRunner.Domain;
using System.Reflection;
using MyTestRunner.Infrastructure;

namespace MyTestRunner.Tests.Domain.MsTestFinder
{
    /// <summary>
    /// Specifies how set up methods should be found.
    /// </summary>
    [TestFixture]
    [TestsOn(typeof(MyTestRunner.Domain.MsTestFinder))]
    public class WhenFindingSetUpMethods : MyTestRunner.Tests.Domain.WhenFindingSetUpMethods
    {
        /// <summary>
        /// Returns the test finder we want to test.
        /// </summary>
        public override ITestFinder CreateSut()
        {
            return new MyTestRunner.Domain.MsTestFinder();
        }

        /// <summary>
        /// Returns a test class that does have a setup method.
        /// </summary>
        public override Type GetTestWithSetUpMethod()
        {
            return typeof(TestClassWithInitializeAndCleanupMethods);
        }

        /// <summary>
        /// Returns a test class that does not have a setup method.
        /// </summary>
        public override Type GetTestWithoutSetUpMethod()
        {
            return typeof(TestClassWithoutInitializeOrCleanupMethods);
        }
    }
}
